# -*- coding: utf-8 -*-
# @File  : app01.py
# @Author:  liubinyu
# @Time: 2024/5/19 11:39
from typing import Union, Optional

from fastapi import APIRouter, Form

app04 = APIRouter()

@app04.post("/regin")
def regin(username: str = Form(..., max_length=16, min_length=8, regex='[a-zA-Z]'),
          password: str = Form(..., max_length=16, min_length=8, regex='[0-9]')):
    print(f"username:{username},password:{password}")
    return {"username": username}
